package com.weakteam.orderonline.adminconsole.gwt.client.design;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiFactory;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.*;
import com.weakteam.orderonline.adminconsole.gwt.client.widget.*;


/**
 * Created by Max on 03.04.2014.
 */
public class PlacesPage extends Composite {
    interface PlacesPageUiBinder extends UiBinder<Widget, PlacesPage> { }
    private static PlacesPageUiBinder uiBinder = GWT.create(PlacesPageUiBinder.class);

    private static PlacesPage instance = null;
    public static PlacesPage getInstance() {
        if (instance == null) {
            instance = new PlacesPage();
        }
        return instance;
    }

    @UiField  protected FlowPanel contentPanel;
    protected PlacesWidget placesWidget;

    @UiFactory
    Header makeHeader() { // method name is insignificant
        return Header.getInstance();
    }


    private PlacesPage() {
        initWidget(uiBinder.createAndBindUi(this));
        this.placesWidget = new PlacesWidget();
        this.contentPanel.add(this.placesWidget);
    }

}
